<?php
/**
 * Created by PhpStorm.
 * User: LENOVO
 * Date: 2018/8/6
 * Time: 23:25
 */

namespace app\wx\controller;


use app\wx\WxConfig;

class SendMessageAll extends WxConfig
{
    public function sendMessageAll()
    {
        $access_token = $this->getWxAccessToken();
        $url = "https://api.weixin.qq.com/cgi-bin/message/mass/sendall?access_token=$access_token";
        $data = '
        {
"filter":{
"is_to_all":true
},
"text":{
"content":"我日你噶爹！！！"
},
"msgtype":"text"
}
        ';
        echo  $this->url_post($url,$data);
    }
}